﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

namespace WsGameFrame
{
    public abstract class BaseSinglton<T> where T : new()
    {
        //单例模式
        private static T _Singleton;

        public static T Singleton
        {
            get
            {
                if (_Singleton == null)
                {
                    //Debug.LogError(typeof(T).ToString() + "加载单例不存在, new一个!");
                    _Singleton = new T();
                }

                return _Singleton;
            }

        }
    }

}
